Methods, systems, and devices for management of a memory system

ABSTRACT

Methods, devices, and systems for a memory management system within an electronic device are disclosed, such as those wherein the memory management system is external to and compatible with the architecture of currently existing operating systems. One such memory management system may include a power savings manager configured to be invoked by a memory allocation manager. The power savings manager may also be configured to determine whether physical memory blocks should be active or inactive. Furthermore, the memory management system may include a driver configured to activate or deactivate a memory block in response to a system call from the power savings manager.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. patent application Ser. No. 11/926,324, filed Oct. 29, 2007, scheduled to issue as U.S. Pat. No. 8,082,387 on Dec. 20, 2011, the disclosure of which is hereby incorporated herein by this reference in its entirety.

FIELD OF THE INVENTION

Embodiments of the present invention relate to memory. More specifically, one or more embodiments of the present invention relate to the management of memory resources within an electronic device.

BACKGROUND

Electronic devices have become increasingly popular in recent years. Electronic devices may include, for example, personal digital assistants (PDAs), cellular telephones, portable media players, digital cameras, or personal computers. Such electronic devices are typically microprocessor based, equipped with one or more operating systems, and frequently include one or more types of memory resources such as volatile and non-volatile memories. Although extremely useful, electronic devices often come with related disadvantages, including limited computing power, limited memory resources, and a finite power life. Power life may depend not only on the type and/or size of battery used in a particular device, but also on particular power management and memory management systems utilized in an electronic device.

Conventionally, computer memory is managed in blocks and segments. A memory block may refer to a partition of memory, wherein given a specific memory device, a memory block size is fixed. A memory segment may refer to a partition of memory having an unfixed size that may, depending on the system hardware, be dynamically generated and allocated for use by a computer program or application. A memory segment starts at a given physical memory address and has a certain partition length. For example, each memory block within a computer system may include a plurality of memory segments or one memory segment may be spread out over multiple memory blocks.

Applications, such as a user application or an operating system application, need memory resources to execute or store data. Since memory resources in an electronic device are limited, memory segments are allocated to each application as the application requires. Embedded processors, as well as other processors, generally use a memory manager to manage memory resources. When an application needs additional memory resources, the application makes a memory allocation request to the memory manager. Thereafter, the memory manager locates a segment of free memory that is typically larger than that of the request, and allocates the requested memory to the application. When the application is finished, or the application no longer needs the memory, the application informs the memory manager that the memory segment may be de-allocated. In response, the memory manager then places the memory segment back in the memory pool where it becomes available for a future allocation.

Volatile memories, such as dynamic random access memories (DRAMs) or static random access memories (SRAMs), are commonly used in electronic devices. Unlike non-volatile memories, volatile memories need continuous refreshing and, thus, require power for maintaining data stored in the memory. However, in portable electronic devices, such as PDAs, cellular telephones, laptops and other portable computing devices, it is desirable to reduce power consumption as much as possible to maximize the available “on time” for the electronic device. Therefore, some memory devices, such as low power DRAMs and cellular random access memories (CRAMs) may include partial array refresh (PAR) functionality. PAR is a hardware feature that may allow for the disablement of the refresh functionality of particular memory blocks. Using a PAR implementation, only memory blocks containing data are refreshed. Memory blocks that do not contain data are not refreshed and, as a result, power consumption of the memory device may be reduced. Currently, PAR is a complex hardware feature that is not automatically compatible with existing commercial operating systems.

FIG. 1 illustrates a conventional system memory 110 within an electronic device. As known in the art, system memory 110 may include system resources, such as a code area 102, a stack area 104, and a system heap 106. System heap 106 includes all of the unallocated memory segments within system memory 110 that remain after an operating system 112 has been initialized. System memory 110 also includes a memory allocation manager 114 and a memory allocation table 116, both of which may be configured as modules of operating system 112. Memory allocation manager 114 may control system heap 106 and may allocate memory segments within system heap 106 for use by an application in order to perform a task. Upon completion of a task, memory allocation manager 114 may de-allocate the memory segment used for the task and the de-allocated memory segment may then be returned to system heap 106. In order to track and assist in the allocation and de-allocation of memory resources, memory allocation table 116 may include a listing of the memory blocks within a memory device, all existing memory segments, the size of each memory segment, the starting address, and the status of the memory segments, such as “available” or “in use.” In a conventional system memory, memory allocation manager 114 has no knowledge of the memory blocks within a memory device and, therefore, memory allocation manager 114 cannot enable or disable a memory block's refresh functionality. As a result, each memory block within the memory device, independent of whether the memory block includes allocated memory segments, remains “on” at all times during operation of the electronic device and, therefore, continuously consumes power whether or not the memory block is being utilized.

FIG. 2 illustrates a conventional memory management system 200 within an electronic device. Memory management system 200 includes one or more application programs 204, operating system 112, memory allocation manager 114, memory allocation table 116, and memory devices 206. As mentioned above, memory allocation table 116 includes an entry for each memory block and memory segment within memory devices 206. Furthermore, in order for memory allocation table 116 to provide the starting address, size, and status of each memory segment, each memory segment entry in memory allocation table 116 may be dynamically mapped (shown by arrows 210) to one or more physical memory segments (206(1) . . . (206(n)) within memory devices 206. Although memory devices 206 may include PAR functionality, conventional memory management system 200 is not automatically compatible with a PAR feature and, therefore, all memory blocks within memory devices 206 remain active at all times.

During operation of conventional memory management system 200, at least one application of application programs 204 may initiate a system call to memory allocation manager 114 to acquire additional memory resources from system heap 106 (see FIG. 1). Upon receiving the system call for memory acquisition, memory allocation manager 114 may search allocation table 116 to find a memory portion to satisfy the memory request. Upon finding a memory portion, memory allocation manager 114 allocates available memory segments to the application requesting the memory resources. Additionally, at least one application of application programs 204 may initiate a system call to memory allocation manager 114 to release memory segments being utilized by the application. Upon receiving the memory release system call, memory allocation manager 114 may de-allocate the memory segments from the application and the memory segments may be returned to system heap 106.

There is a need for methods, systems, and devices to enhance the memory management of an electronic device, such as to allow for enhanced power savings. Specifically, there is a need for a memory management system that is compatible with currently available operating systems and which may allow for the reduction of power consumption by activating and deactivating memory blocks dependent on whether the memory blocks are being utilized by an electronic device.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a conventional system memory within an electronic device.

FIG. 2 is a block diagram of a conventional memory management system within an electronic device.

FIG. 3 is a block diagram of a system memory according to an embodiment of the present invention.

FIG. 4 is a block diagram of various memory devices including memory blocks.

FIG. 5 is a block diagram of a memory management system according to an embodiment of the present invention.

FIG. 6 is a flow diagram illustrating a method of operation of the memory management system described in FIG. 5.

FIG. 7 is an electronic system diagram including a system memory containing a memory management system in accordance with an embodiment of the present invention.

DETAILED DESCRIPTION

Embodiments of the present invention comprise methods, devices, and systems configured to manage memory blocks within a system memory and activate and deactivate the memory blocks dependent on whether the memory blocks are being at least partially utilized.

In the following detailed description, reference is made to the accompanying drawings which form a part hereof, and in which is shown by way of illustration specific embodiments in which the invention may be practiced. These embodiments are described in sufficient detail to enable those of ordinary skill in the art to practice the invention, and it is to be understood that other embodiments may be utilized, and that structural, logical, and electrical changes may be made within the scope of the present invention.

The following provides a more detailed description of the present invention and various embodiments thereof. In this description, circuits and functions may be shown in block diagram form in order not to obscure the present invention in unnecessary detail. Conversely, specific circuit implementations shown and described are illustrative only and should not be construed as the only way to implement the present invention unless specified otherwise herein. Additionally, block definitions and partitioning of logic between various blocks is illustrative of a specific implementation. It will be readily apparent to one of ordinary skill in the art that the present invention may be practiced by numerous other partitioning solutions. For the most part, details concerning timing considerations and the like have been omitted where such details are not necessary to obtain a complete understanding of the present invention and are within the abilities of persons of ordinary skill in the relevant art.

In this description, some drawings may illustrate signals as a single signal for clarity of presentation and description. It will be understood by a person of ordinary skill in the art that the signal may represent a bus of signals, wherein the bus may have a variety of bit widths and the present invention may be implemented on any number of data signals including a single data signal.

When executed as firmware or software, the instructions for performing the methods and processes described herein may be stored on a computer readable medium. A computer readable medium includes, but is not limited to, magnetic and optical storage devices, such as disk drives, magnetic tape, CDs (compact disks), DVDs (digital versatile discs or digital video discs), and semiconductor devices, such as RAM, DRAM, ROM, EPROM, and Flash memory.

Further, the term “module” is used herein in a non-limiting sense and solely to indicate functionality of particular assemblies included within embodiments of the invention, and may not be construed as requiring a particular physical structure, or particular partitioning between elements of the invention performing indicated functions.

Those skilled in the art will recognize that many modifications may be made to this configuration without departing from the scope of the present invention. For example, any combination of the above components, or any number of different components, peripherals, and other devices, may be used with the present invention.

FIG. 3 illustrates a system memory 300 according to an embodiment of the present invention. For example, system memory 300 may include non-volatile and/or volatile memory resources. Examples of these memory resources include Flash memory, read only memory (ROM), random access memory (RAM), etc. Non-volatile and volatile memory can also include memory provided on storage devices, such on disks, drives, and other such form factors. As known by one having ordinary skill in the art, system memory 300 may include system resources, such as code area 302, stack area 304, and system heap 306. System heap 306 may contain all of the unallocated or “free” memory resources within system memory 300. Furthermore, system memory 300 may include an operating system 312. Examples of operating systems include, but are not limited to, Windows, Mac OS X, UNIX® and Linux.

Furthermore, system memory 300 may include a memory allocation manager 314. Memory allocation manager 314 may be implemented as a module of operating system 312 and may be activated by, for example, an application program requiring additional memory resources. Additionally, for example only, memory allocation manager 314 may be activated by another operating system module, such as a task initiator (not shown), which allocates required resources such as hardware peripherals, files, or memory space to a new application program. Memory allocation manager 314 may be configured to control system heap 306 and to allocate an available memory segment within system heap 306 for use by an application program in order to perform a task. Upon completion of a task, memory allocation manager 314 may be configured to de-allocate the memory segment used by the application program and, thereafter, the memory segment may be returned to system heap 306. In order to assist in the allocation and de-allocation of memory segments, operating system 312 may be configured to implement a memory allocation table 316. Memory allocation table 316 may be configured as a module of operating system 312 and may provide a listing of all memory blocks within a memory device and the status of each memory block, such as “on” or “off.” Memory allocation table 316 may also provide a listing of all existing memory segments, including the starting address of each memory segment, the size of each memory segment and the status of each memory segment, such as “available” or “in use.”

By way of example and not limitation, FIG. 4 illustrates a plurality of memory blocks 380 within various memory devices 390(a), 390(b), and 390(c). As illustrated in FIG. 4, the number of memory blocks 380 within a given memory device 390(a), 390(b), and 390(c) may vary depending on the type of memory device. As described above, during operation of a memory device, memory blocks 380 may include one or more allocated memory segments (not shown), or a single allocated memory segment may be spread out over multiple memory blocks. Furthermore, at a given time during operation of a memory device, it is possible for a memory block to not include any allocated memory segments. As described in more detail below, memory blocks that do not include at least one allocated memory segment may be switched “off.” Memory blocks switched “off” are not refreshed and, therefore, do not consume system power. As shown in FIG. 4, memory blocks 380′ do not include any allocated memory segments and, therefore, memory blocks 380′ have been switched to “off” (indicated by diagonal lines).

Referring again to FIG. 3, system memory 300 may also include a power savings manager 318 that may be implemented as a level of memory management in addition to memory allocation manager 314. Power savings manager 318 may be configured to allow for, as described more fully below, integration of a PAR feature with an operating system of an electronic device. Power savings manager 318 may be embedded within memory allocation manager 314, or power savings manager 318 may be configured as an individual module of operating system 312, separate from memory allocation manager 314, as shown in FIGS. 3 and 5. Furthermore, power savings manager 318 may be configured to hide the physical details of a memory device (e.g., number of memory blocks, size of memory blocks, and status of memory blocks) from memory allocation manager 314. As a result, a PAR feature may be integrated with operating system 312 independent of the type of memory devices, so long as the memory devices include PAR capability.

Power savings manager 318 may be further configured to monitor a plurality of memory blocks within a memory device and determine whether there are any memory blocks that do not include at least one allocated memory segment. Additionally, power savings manager 318 may be configured to initiate a system call to driver 320. As a non-limiting example, driver 320 may include a memory driver. Driver 320 may be configured to, using memory specific commands, manage the physical features of a memory device, such as selectively switching memory blocks “on” or “off” as directed by power savings manager 318. For example only, if power savings manager 318 determines that there is one or more memory blocks that do not include at least one allocated memory segment, power savings manager 318 may issue a command to driver 320 to switch the one or more memory blocks “off.” Furthermore, if at any time during operation a “switched off” memory block is needed, power savings manager 318 may be invoked by memory allocation manager 314 to determine if there are any inactive memory blocks that may be turned on. Thereafter, power savings manager 318 may initiate a system call to driver 320 to selectively “switch on” an available memory block. In addition, driver 320 may be configured to implement a memory compaction process in order to maximize the number of inactive blocks. A memory compaction process, as known by a person having ordinary skill in the art, involves moving all of the allocated memory segments to adjacent memory locations within a memory device, so as to create a maximum number of memory blocks without allocated memory segments.

FIG. 5 illustrates a memory system 402 including a memory management system 400 and memory devices 406. Memory management system 400 may integrate power savings manager 318 with memory devices 406 having PAR functionality so as to implement a PAR hardware feature with an operating system. As shown in FIG. 5, memory management system 400 may include one or more application programs 404, operating system 312, memory allocation manager 314, memory allocation table 316, power savings manager 318, and driver 320. Memory allocation table 316 includes an entry for each memory block and memory segment within memory devices 406. Furthermore, in order for memory allocation table 316 to provide the address, size, and status of each memory segment entry, each memory segment entry may be mapped (shown by arrows 310) to one or more physical memory segments (406(1) . . . (406(n)) within memory devices 406.

Power savings manager 318 may be configured to hide the physical details of a memory device from other modules, such as memory allocation manager 314, so as to allow for the implementation of memory management system 400 with limited modification to memory allocation manager 314 or other modules of currently existing operating systems. Furthermore, memory management system 400 may be configured to be compatible with all existing memory allocation techniques, such as static memory allocation or dynamic memory allocation.

Some contemplated operations of memory management system 400 will now be described. At least one application of application programs 404 may, for example only, initiate a system call to memory allocation manager 314 to acquire additional memory resources. Upon receiving the system call for memory acquisition, memory allocation manager 314 may search memory allocation table 316, locate available memory segments, and allocate memory segments within system heap 306 (see FIG. 3) to the requesting application. After the memory has been allocated, memory allocation manager 314 may update memory allocation table 316 to display the updated allocation status. Additionally, at least one application of application programs 404 may, for example only, initiate a system call to memory allocation manager 314 to release memory segments being utilized by the application. Upon receiving the system call for a memory release, memory allocation manager 314 may release the memory segments from the application and the memory segments may be returned to system heap 306. After the memory has been de-allocated, memory allocation manager 314 may update memory allocation table 316 to display the updated allocation status.

Furthermore, power savings manager 318 may monitor memory blocks within a memory device and, upon determining that a memory block does not include any allocated memory segments, initiate a system call to driver 320 to deactivate the memory block (e.g., switch “off”). Upon receiving a “switch off” system call, driver 320 may deactivate the memory block. After the memory block has been deactivated, power savings manager 318 may update the memory allocation table 316 to display the updated memory block status. In addition, power savings manager 318 may, upon being notified by memory allocation manager 314 that additional memory space is required, identify available memory blocks that may be inactive and initiate a “switch on” system call to driver 320 to activate the available memory block. Upon receiving the “switch on” system call, driver 320 may activate the memory block. After the memory block has been activated, power savings manager 318 may update the memory allocation table 316 to display the updated memory block status.

FIG. 6 is a flow diagram of an embodiment of a method of operation of memory management system 400, as depicted in FIG. 5. The management process 500 begins by monitoring a plurality of memory blocks and determining whether memory blocks are required 502 (i.e., make a determination as to whether there is at least one memory block that does not include at least one allocated memory segment). If it is determined that there is at least one memory block that does not include at least one allocated memory segment, the at least one memory block is not required and, therefore, the at least one memory block may be turned “off” 504. If a memory block is required, memory segments within the memory block may be allocated to an application in order to perform a task 506. Upon completion of a task 508, the allocated memory segments may be de-allocated 510 and returned to system heap 106 (see FIG. 3). As illustrated in FIG. 6, after memory segments are de-allocated 510, memory management system 400 (see FIG. 5) may again make a determination as to whether memory blocks, having no allocated memory segments, are required 502. If at any time during process 500, memory allocation manager 314 (see FIGS. 3 and 5) determines additional memory resources are required, memory allocation manager 314 may initiate power savings manager 318 to activate any available memory blocks that are inactive.

A processor-based system 600 that includes a memory management system in accordance with an embodiment of the present invention is illustrated in FIG. 7. Processor-based system 600, such as a computer system, for example, generally comprises a central processing unit (CPU) 644, for example, a microprocessor that may communicate with one or more input/output (I/O) devices 646 over a bus 652. Non-limiting examples of I/O devices may include data storage devices, networking devices, data I/O devices (e.g., keyboards, displays, audio/video devices, etc.), etc. The system 600 also includes memory system 402 comprising a power savings manager 318 within a memory management system 400 (see FIG. 5) as described hereinabove.

Specific embodiments have been shown in the drawings and have been described in detail herein; however, the invention may be susceptible to various modifications and alternative forms. It should be understood that the invention is not intended to be limited to the particular forms disclosed. Rather, the invention includes all modifications, equivalents, and alternatives falling within the scope of the invention as defined by the following appended claims and their legal equivalents. 

1. A method of managing semiconductor memory, comprising: determining whether a memory block includes at least one memory segment allocated for use by an operating system memory allocation manager; deactivating the memory block in response to determining that the memory block does not include at least one allocated memory segment; and activating the memory block in response to determining that the memory block includes at least one allocated memory segment.
 2. The method of claim 1, wherein determining whether at least one memory block includes at least one memory segment allocated for use comprises determining whether any of a plurality of memory blocks includes at least one memory segment allocated for use.
 3. The method of claim 1, further comprising issuing a command from a software module to a driver to activate a deactivated memory block upon determining that additional memory resources are required by an application program.
 4. The method of claim 2, further comprising initiating a system call within a software module to activate at least one memory block of the plurality of memory blocks.
 5. The method of claim 4, further comprising updating a memory allocation table of the software module to include an updated memory block status entry after activating the at least one memory block of the plurality of memory blocks.
 6. The method of claim 2, wherein determining whether any of a plurality of memory blocks includes a memory segment allocated for use comprises monitoring a plurality of memory blocks with a power savings manager software module configured to determine whether each of the plurality of memory blocks should be active or inactive based on a determination of whether each of the plurality of memory blocks includes the at least one allocated memory segment.
 7. The method of claim 1, wherein determining whether a memory block includes at least one allocated memory segment comprises determining with a power savings manager software module whether each memory block of a plurality of memory blocks includes the at least one allocated memory segment.
 8. The method of claim 1, wherein deactivating the memory block comprises issuing a command from a software module to a driver by initiating a system call in the software module to the driver to deactivate the memory block.
 9. The method of claim 1, further comprising updating a memory allocation table of the software module to include an updated memory block status entry after deactivating the memory block.
 10. A memory management system, comprising: a power savings manager software module configured to determine whether a memory block includes at least a portion of at least one memory segment allocated for use by an operating system memory allocation manager; a memory allocation manager software module configured to allocate and de-allocate memory segments and invoke the power savings manager software module; and a driver configured to one of activate and deactivate the memory block in response to receiving a command from the power savings manager software module, wherein the driver activates the entire memory block if the memory block includes at least a portion of at least one allocated memory segment.
 11. The memory management system of claim 10, wherein the power savings manager software module is further configured to determim whether any of a plurality of memory blocks includes at least a portion of at least one memory segment allocated for use by an operating system memory allocation manager.
 12. The memory management system of claim 10, wherein the power savings manager software module is embedded within the memory allocation manager software module.
 13. The memory management system of claim 10, wherein the power savings manager software module is separate from the memory allocation manager software module.
 14. The memory management system of claim 10, wherein the driver comprises a memory driver.
 15. The memory management system of claim 10, wherein the driver is further configured to use memory specific commands to at least one of activate and deactivate the memory block.
 16. The memory management system of claim 10, wherein the memory management system is compatible with at least one of a static memory allocation technique and a dynamic memory allocation technique.
 17. The memory management system of claim 10, further comprising a memory allocation table associated with the memory allocation manager software module, the memory allocation table including a plurality of entries, wherein at least one entry of the plurality of entries corresponds to a memory segment and at least one entry of the plurality of entries represents a memory block.
 18. A memory system, comprising: at least one semiconductor memory having a plurality of memory blocksand including a partial array refresh (PAR) feature; memory allocation manager software adapted to allocate and de-allocate memory segments to the at least one semiconductor memory; power savings manager software configured to identify memory blocks of the plurality of memory blocks that do not include at least one allocated memory segment, and initiate a system call in response to a signal from the memory allocation manager software; and a driver adapted to manage physical features of the at least one semiconductor memory responsive to the system call, to deactivate a memory block of the plurality of memory blocks if the memory block does not include at least one allocated memory segment and to activate the memory block if the memory block includes at least one allocated memory segment.
 19. The memory system of claim 18, wherein the power savings manager software is further adapted to hide physical details of the at least one semiconductor memory from the memory allocation manager software.
 20. An electronic system, comprising: a processor-based device including a memory, comprising: at least one semiconductor memory with a partial array refresh (PAR) feature; and power savings manager software configured to identify and deactivate memory blocks within the at least one memory device that do not include at least one allocated memory segment, wherein the identified memory block is activated if the memory block includes at least one allocated memory segment.
 21. The electronic system of claim 20, wherein the power savings manager software is compatible with an existing operating system.
 22. A computer-readable media storing instructions that, when executed by a processor, cause the processor to perform instructions for managing a system memory, the instructions comprising: identifying within a software module at least one memory block within at least one memory that does not include at least one memory segment allocated for use by an operating system memory allocation manager; the software module initiating a command to deactivate the identified at least one memory block; and in response to the command, deactivating the identified at least one memory block; wherein the identified at least one memory block is activated if the memory block includes at least one allocated memory segment. 